package com.md.youyouhui.ui.shopping;

import android.databinding.DataBindingUtil;

import com.md.youyouhui.R;
import com.md.youyouhui.databinding.ActivityNoticeBinding;
import com.md.youyouhui.ui.BaseActivity;


public class NoticeActivity extends BaseActivity {
    ActivityNoticeBinding noticeBinding;
    String content;

    @Override
    public void setContentLayout() {
        noticeBinding = DataBindingUtil.setContentView(this, R.layout.activity_notice);

    }

    @Override
    public void initView() {
        setSupportActionBar(noticeBinding.toolbar);
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    }




    @Override
    public void initData() {
        String css = "<style type=\"text/css\"> " +
                "img {" +
                "width:100%;" +
                "height:auto;" +
                "}" +
                "body {" +
                "margin-right:15px;" +
                "margin-left:15px;" +
                "margin-top:15px;" +
                "font-size:30px;" +
                "}" +
                "p {" +
                "size:13px;" +
                "}" +
                "</style>";
        content = getIntent().getStringExtra("content");
        noticeBinding.webView.loadDataWithBaseURL(null, "<html><header>" + css + "</header><body>" + content + "</body></html>", "text/html", "UTF-8", null);
    }
}
